//
//  JYUtils.h
//  FpdCarInCube
//
//  Created by WXC on 2017/4/11.
//  Copyright © 2017年 jiaoyin. All rights reserved.
//

#import <Foundation/Foundation.h>

#define isEmptyObject(obj)                      [JYUtils isBlankObject:obj] // 是否空数组或字典

@interface JYUtils : NSObject


// 获取某年某月总共多少天
+ (NSInteger)getDaysInMonth:(NSInteger)year month:(NSInteger)imonth;

// 是否 空字典或空数组
+ (BOOL)isBlankObject:(id)object;

// 创建目录，如果不存在，则创建
+ (BOOL)createDirectory:(NSString *)dirName;


+ (void)reminderInfoWithView:(UIView *)view;

/**
 *  返回传入天数的日期
 */
+ (NSString *)getDateByAddingDays:(NSInteger)days andDateString:(NSString *)dateString;

/**
 *  返回传入月数的日期
 */
+ (NSString *)getDateByAddingMonths:(NSInteger)months andDateString:(NSString *)dateString;

+ (NSString *)getTodayDateAndHourMinuteSecond;
+ (NSString *)getToday;
// 计算普通文字的size
+ (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize;
// 获取app版本号，并转换成整数
+ (NSInteger)getAppVersion;
+ (void)setTagsWithAPNsInfos:(NSArray *)APNsInfos andEnvironment:(NSString *)environment andIsLogin:(BOOL)isLogin;

+ (void)reminderInfoWithString:(NSString *)string andRect:(CGRect)rect andColor:(UIColor *)color;

+ (BOOL)isEarlierThanTimeNowWithTime:(NSString *)compareTime andLastday:(NSString *)lastDay;

/**
 *  NSDate时间转换成NSString
 *  @pram fmt @"yyyy-MM-dd HH:mm:ss"、 @"yyyy-MM-dd"
 */
+ (NSString *)date2StringWithDate:(NSDate *)date dateFormat:(NSString *)fmt;

+ (NSString *)dateStrByAddDot:(NSString *)dateStr;

+ (NSDate *)dateFromString:(NSString *)dateString formatter:(NSString *)fmt;

+ (NSString *)textFiledEditChanged:(UITextField *)textField andLimitCount:(NSInteger)length;

+ (NSString *)textViewEditChanged:(UITextView *)textField andLimitCount:(NSInteger)length;

+ (UIImage *)captureWithView:(UIView *)view;

// 去除表情
+ (NSString*)disable_EmojiString:(NSString *)text;

// 检测手机号格式是否正确
+ (BOOL)checkMobilephoneNumber:(NSString *)phoneNumber;

// 检验身份证是否正确
+ (BOOL)checkIDCard:(NSString *)IDCard;


// 设备
+ (NSString*)deviceString;


+ (NSString *)md5:(NSString *)input;
@end
